<%--
  Created by IntelliJ IDEA.
  User: hp
  Date: 2021/1/3
  Time: 16:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>

    <title>我的图书 | 首页</title>
    <jsp:include page="/includes/head.jsp" />
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <jsp:include page="/includes/header.jsp" />

    <jsp:include page="/includes/menu.jsp" />
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>图书列表</h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li class="active">图书列表</li>
            </ol>
        </section>
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header">
                            <h3 class="box-title">图书列表</h3>
                        <!-- /.box-header -->
                        </div>
                            <div class="row" style="padding-left: 12px; padding-top: 10px;">
                                <div class="col-xs-12">
                                    <a href="book_add.jsp" type="button" class="btn btn-sm btn-default"><i class="fa fa-plus"> 新增</i></a>&nbsp;&nbsp;
                                    <button type="button" class="btn btn-sm btn-default" onclick=""><i class="fa fa-trash"> 删除</i></button>&nbsp;&nbsp;
                                    <a href="#" type="button" class="btn btn-sm btn-default"><i class="fa fa-arrow-down"> 导入</i></a>&nbsp;&nbsp;
                                    <a href="#" type="button" class="btn btn-sm btn-default"><i class="fa fa-arrow-up"> 导出</i></a>
                                </div>
                            </div>
                        <div class="box-body table-responsive">
                            <table id="datatable" class="table table-hover">
                                <thead>
                                <tr>
                                    <th>书名</th>
                                    <th>作者</th>
                                    <th>出版社</th>
                                    <th>国际标准书号</th>
                                    <th>图书分类</th>
                                    <th>图书单价</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:forEach var="book" items="${books}">
                                    <tr>
                                        <input name="id" type="hidden" value="${book.id}">
                                        <td>${book.bookName}</td>
                                        <td>${book.author}</td>
                                        <td>${book.press}</td>
                                        <td>${book.isbn}</td>
                                        <td>${book.category}</td>
                                        <td>${book.price}</td>
                                        <td><a href="/book/find?id=${book.id}" type="button" class="btn btn-sm btn-primary"><i class="fa fa-edit">编辑</i></a>&nbsp;&nbsp;
                                        <a href="/book/delete?id=${book.id}" type="button" class="btn btn-sm btn-danger"><i class="fa fa-trash">删除</i></a>
                                        </td>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </table>
                        </div>
                        <!-- /.box-body -->
                    </div>
                    <!-- /.box -->
                </div>
            </div>
        </section>
    </div>
    <jsp:include page="/includes/copyright.jsp" />
</div>
<jsp:include page="/includes/footer.jsp" />
</body>
</html>
